package day01_IO_JDBC.demo_JDBC_emp.view;

import day01_IO_JDBC.demo_JDBC_emp.controller.EmpController;
import day01_IO_JDBC.demo_JDBC_emp.entity.Emp;
import day01_IO_JDBC.demo_JDBC_users.controller.UsersController;

import java.util.Scanner;

public class EmpView {
    public static void main(String[] args) {
        System.out.println("请输入人员操作：");
        System.out.println("1：注册：");
        System.out.println("2：登录：");
        System.out.println("3：修改：");
        System.out.println("4：删除：");

        Scanner scanner= new Scanner(System.in);
        int input_option= scanner.nextInt();

        while (true) {
            switch (input_option) {
                case 1:
//                    创建controller对象
                    EmpController empController= new EmpController();

                    System.out.println("请输入id：");
                    int id= scanner.nextInt();
                    System.out.println("请输入姓名：");
                    String name= scanner.next();
                    System.out.println("请输入薪资情况（元）：");
                    double salary= scanner.nextDouble();

//                    添加参数信息
                    Emp emp= new Emp(id,name, salary);
                    empController.register(emp);

                    break;
                case 2:

                    break;
                case 3:

                    break;
                case 4:

                    break;

            }
            break;
        }
    }
}
